#! python
#  $Id: setup.py,v 1.12 2009/06/16 22:36:02 mculbert Exp $

from distutils.core import setup, Extension

modules = [
            Extension('Correlator', sources = ['smds/Correlator.c']),
            Extension('Tabulator', sources = ['smds/Tabulator.c']),
            Extension('Tabulator_PCH', sources = ['smds/Tabulator_PCH.c']),
            Extension('Tabulator_IPCH', sources = ['smds/Tabulator_IPCH.c']),
            Extension('loadintens', sources = ['smds/loadintens.c']),
            Extension('Cores.c2D', sources = ['smds/Cores/c2D.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c2D'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 2D"'),
                                      ]),
            Extension('Cores.c2Di', sources = ['smds/Cores/c2Di.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c2Di'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 2D,'
                           + ' Intensity Profile"'),
                                       ('CORE_INTENS', 1),
                                      ]),
            Extension('Cores.c2Dph', sources = ['smds/Cores/c2Dph.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c2Dph'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 2D,'
                           + ' Photobleaching"'),
                                       ('CORE_BLEACH', 1),
                                      ]),
            Extension('Cores.c2Dphi', sources = ['smds/Cores/c2Dphi.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c2Dphi'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 2D,'
                           + ' Photobleaching, Intensity Profile"'),
                                       ('CORE_INTENS', 1),
                                       ('CORE_BLEACH', 1),
                                      ]),
            Extension('Cores.c3D', sources = ['smds/Cores/c3D.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3D'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D"'),
                                       ('CORE_3D', 1),
                                      ]),
            Extension('Cores.c3Di', sources = ['smds/Cores/c3Di.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Di'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D,'
                           + ' Intensity Profile"'),
                                       ('CORE_INTENS', 1),
                                       ('CORE_3D', 1),
                                      ]),
            Extension('Cores.c3Dph', sources = ['smds/Cores/c3Dph.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Dph'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D,'
                           + ' Photobleaching"'),
                                       ('CORE_BLEACH', 1),
                                       ('CORE_3D', 1),
                                      ]),
            Extension('Cores.c3Dphi', sources = ['smds/Cores/c3Dphi.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Dphi'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D,'
                           + ' Photobleaching, Intensity Profile"'),
                                       ('CORE_INTENS', 1),
                                       ('CORE_BLEACH', 1),
                                       ('CORE_3D', 1),
                                      ]),
            Extension('Cores.c3Df', sources = ['smds/Cores/c3Df.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Df'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D,'
			   + ' Flow"'),
                                       ('CORE_3D', 1),
                                       ('CORE_FLOW', 1),
                                      ]),
            Extension('Cores.c3Db', sources = ['smds/Cores/c3Db.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Db'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D,'
			   + ' Blinking"'),
                                       ('CORE_3D', 1),
                                       ('CORE_BLINK', 1),
                                      ]),
            Extension('Cores.c3Dit', sources = ['smds/Cores/c3Dit.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Dit'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D,'
                           + ' Intensity Profile, Intersystem Crossing"'),
                                       ('CORE_INTENS', 1),
                                       ('CORE_TRIPLET', 1),
                                       ('CORE_3D', 1),
                                      ]),
            Extension('Cores.c3Dv', sources = ['smds/Cores/c3Dv.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Dv'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D, Vesicles"'),
                                      ]),
            Extension('Cores.c3Dv_static', sources = ['smds/Cores/c3Dv_static.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Dv_static'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D, Vesicles, Static size/numMolec allocation"'),
                                      ]),
            Extension('Cores.c3Dvph', sources = ['smds/Cores/c3Dvph.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c3Dvph'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 3D, Vesicles, Photobleaching"'),
                                       ('CORE_BLEACH', 1),
                                      ]),
            Extension('Cores.c2D_ccd', sources = ['smds/Cores/c2D_ccd.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c2D_ccd'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 2D, CCD detection"'),
                                       ('CORE_CCD', 1),
                                      ]),
            Extension('Cores.c2D_sp', sources = ['smds/Cores/c2D_sp.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'c2D_sp'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, 2D, Alternating species"'),
                                       ('CORE_STATES', 1),
                                      ]),
            Extension('Cores.cAHL', sources = ['smds/Cores/cAHL.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel"'),
                                      ]),
            Extension('Cores.cAHL_lef', sources = ['smds/Cores/cAHL_lef.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_lef'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow"'),
                                      ]),
            Extension('Cores.cAHL_elef', sources = ['smds/Cores/cAHL_elef.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_elef'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field"'),
                                      ]),
            Extension('Cores.cAHL_chelef', sources = ['smds/Cores/cAHL_chelef.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_chelef'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Point Charges"'),
                                       ('CORE_CHARGE', 1),
                                      ]),
            Extension('Cores.cAHL_fp', sources = ['smds/Cores/cAHL_fp.c'], 
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_fp'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel, Variable stepsize"'),
                                       ('CORE_FP', 1),
                                      ]),
            Extension('Cores.cAHL_sdx', sources = ['smds/Cores/cAHL_sdx.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdx'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution"'),
                                      ]),
            Extension('Cores.cAHL_sdxp', sources = ['smds/Cores/cAHL_sdxp.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdxp'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Custom Potential Field, Static Launch Point, Time to Hit Distribution"'),
                                       ('CORE_POT', 1),
                                      ]),
            Extension('Cores.cAHL_sdxeo', sources = ['smds/Cores/cAHL_sdxeo.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdxeo'),
                                       ('CORE_DOC',
                           '"Simulation parameters, Alpha-Hemolysin Core, Electrophoretic Flow, Exponential Field, Electroosmotic Flow, Static Launch Point, Time to Hit Distribution"'),
                                       ('CORE_OSM', 1),
                                      ]),
            Extension('Cores.cAHL_sphdxeo', sources = ['smds/Cores/cAHL_sphdxeo.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sphdxeo'),
                                       ('CORE_DOC',
                           '"Simulation parameters, Alpha-Hemolysin Core, Electrophoretic Flow, Exponential Field, Electroosmotic Flow, Static Launch Point, Time to Hit Distribution"'),
                                       ('CORE_OSM', 1),
                                       ('CORE_SPH', 1),
                                      ]),
            Extension('Cores.cAHL_sdxeot', sources = ['smds/Cores/cAHL_sdxeot.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdxeot'),
                                       ('CORE_DOC',
                           '"Simulation parameters, Alpha-Hemolysin Core, Electrophoretic Flow, Exponential Field, Electroosmotic Flow, Static Launch Point, Time to Hit Distribution, Tape Record"'),
                                       ('CORE_OSM', 1),
                                       ('CORE_1TAPE', 1),
                                      ]),
            Extension('Cores.cAHL_sdxeo2t', sources = ['smds/Cores/cAHL_sdxeo2t.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdxeo2t'),
                                       ('CORE_DOC',
                           '"Simulation parameters, Alpha-Hemolysin Core, Electrophoretic Flow, Exponential Field, Electroosmotic Flow, Static Launch Point, Time to Hit Distribution, Hit & Miss Tape Records"'),
                                       ('CORE_OSM', 1),
                                       ('CORE_2TAPE', 1),
                                      ]),
            Extension('Cores.cAHL_sphdx', sources = ['smds/Cores/cAHL_sphdx.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sphdx'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Spherical Particle"'),
                                       ('CORE_SPH', 1),
                                      ]),
            Extension('Cores.cAHL_sdxt', sources = ['smds/Cores/cAHL_sdxt.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdxt'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Tape Record"'),
                                       ('CORE_1TAPE', 1),
                                      ]),
            Extension('Cores.cAHL_sdx2t', sources = ['smds/Cores/cAHL_sdx2t.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sdx2t'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Hit & Miss Tape Records"'),
                                       ('CORE_2TAPE', 1),
                                      ]),
            Extension('Cores.cAHL_sphdx2t', sources = ['smds/Cores/cAHL_sphdx2t.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sphdx2t'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Hit & Miss Tape Records, Spherical Particle"'),
                                       ('CORE_SPH', 1),
                                       ('CORE_2TAPE', 1),
                                      ]),
            Extension('Cores.cAHL_sphdxeo', sources = ['smds/Cores/cAHL_sphdxeo.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sphdxeo'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Spherical Particle"'),
                                       ('CORE_SPH', 1),
                                       ('CORE_OSM', 1),
                                      ]),
            Extension('Cores.cAHL_sphdxeot', sources = ['smds/Cores/cAHL_sphdxeot.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sphdxeot'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Tape Record, Spherical Particle"'),
                                       ('CORE_SPH', 1),
                                       ('CORE_OSM', 1),
                                       ('CORE_1TAPE', 1),
                                      ]),
            Extension('Cores.cAHL_sphdxeo2t', sources = ['smds/Cores/cAHL_sphdxeo2t.c'],
                      libraries = ['random'], library_dirs=['.'],
                      define_macros = [('CORE_NAME', 'cAHL_sphdxeo2t'),
                                       ('CORE_DOC',
                           '"Single Molecule Diffusion Simulator Core, Alpha-Hemolycin Channel with Electrophoretic Flow, Exponential Field, Static Launch Point, Time to Hit Distribution, Hit & Miss Tape Records, Spherical Particle"'),
                                       ('CORE_SPH', 1),
                                       ('CORE_OSM', 1),
                                       ('CORE_2TAPE', 1),
                                      ]),
          ]
for m in modules :
  m.extra_compile_args = [ "-I/usr/include/python2.6" ]
#  m.extra_compile_args = [ "-fnested-functions" ]

#setup(ext_modules = [
#            Extension('_numpy', sources = 
#		['Numeric/_numpymodule.c', 'Numeric/arrayobject.c',
#		 'Numeric/ufuncobject.c'],
#		 extra_compile_args = [ "-Iinclude" ] ),
#            Extension('fftpackf', sources =
#                ['Numeric/fftpackmodule.c', 'Numeric/fftpack.c'],
#                extra_compile_args=[ "-Iinclude" ] ),
#		    ],
#		     )

setup(name = 'smds', version = '2.0', 
      description = 'Single Molecule Diffusion Simulator',
      ext_package = 'smds',
      ext_modules = modules,
      packages = ['smds', 'smds.Cores'],
      data_files = [('lib', ['librandom.so']), ]
#		    ('lib/python', ['Numeric/FFTf.py'])],
     )
